3.1.47 \(\int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} (A+B \tan (c+d x)+C \tan ^2(c+d x)) \, dx\) [47]

3.1.47.1 Optimal result
3.1.47.2 Mathematica [A] (verified)
3.1.47.3 Rubi [A] (verified)
3.1.47.4 Maple [F]
3.1.47.5 Fricas [F]
3.1.47.6 Sympy [F]
3.1.47.7 Maxima [F(-1)]
3.1.47.8 Giac [F]
3.1.47.9 Mupad [F(-1)]

3.1.47.1 Optimal result

Integrand size = 41, antiderivative size = 170 \[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\frac {2 C \tan ^{1+m}(c+d x) \sqrt {b \tan (c+d x)}}{d (3+2 m)}+\frac {2 (A-C) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (3+2 m),\frac {1}{4} (7+2 m),-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x) \sqrt {b \tan (c+d x)}}{d (3+2 m)}+\frac {2 B \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (5+2 m),\frac {1}{4} (9+2 m),-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x) \sqrt {b \tan (c+d x)}}{d (5+2 m)} \]

output
2*C*(b*tan(d*x+c))^(1/2)*tan(d*x+c)^(1+m)/d/(3+2*m)+2*(A-C)*hypergeom([1, 
3/4+1/2*m],[7/4+1/2*m],-tan(d*x+c)^2)*(b*tan(d*x+c))^(1/2)*tan(d*x+c)^(1+m 
)/d/(3+2*m)+2*B*hypergeom([1, 5/4+1/2*m],[9/4+1/2*m],-tan(d*x+c)^2)*(b*tan 
(d*x+c))^(1/2)*tan(d*x+c)^(2+m)/d/(5+2*m)
 
3.1.47.2 Mathematica [A] (verified)

Time = 0.55 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.78 \[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\frac {2 \tan ^{1+m}(c+d x) \sqrt {b \tan (c+d x)} \left (C (5+2 m)+(A-C) (5+2 m) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (3+2 m),\frac {1}{4} (7+2 m),-\tan ^2(c+d x)\right )+B (3+2 m) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (5+2 m),\frac {1}{4} (9+2 m),-\tan ^2(c+d x)\right ) \tan (c+d x)\right )}{d (3+2 m) (5+2 m)} \]

input
Integrate[Tan[c + d*x]^m*Sqrt[b*Tan[c + d*x]]*(A + B*Tan[c + d*x] + C*Tan[ 
c + d*x]^2),x]
 
output
(2*Tan[c + d*x]^(1 + m)*Sqrt[b*Tan[c + d*x]]*(C*(5 + 2*m) + (A - C)*(5 + 2 
*m)*Hypergeometric2F1[1, (3 + 2*m)/4, (7 + 2*m)/4, -Tan[c + d*x]^2] + B*(3 
 + 2*m)*Hypergeometric2F1[1, (5 + 2*m)/4, (9 + 2*m)/4, -Tan[c + d*x]^2]*Ta 
n[c + d*x]))/(d*(3 + 2*m)*(5 + 2*m))
 
3.1.47.3 Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.96, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.195, Rules used = {2034, 3042, 4113, 3042, 4021, 3042, 3957, 278}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {b \tan (c+d x)} \tan ^m(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx\)

\(\Big \downarrow \) 2034

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \int \tan ^{m+\frac {1}{2}}(c+d x) \left (C \tan ^2(c+d x)+B \tan (c+d x)+A\right )dx}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \int \tan (c+d x)^{m+\frac {1}{2}} \left (C \tan (c+d x)^2+B \tan (c+d x)+A\right )dx}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 4113

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \left (\int \tan ^{m+\frac {1}{2}}(c+d x) (A-C+B \tan (c+d x))dx+\frac {2 C \tan ^{m+\frac {3}{2}}(c+d x)}{d (2 m+3)}\right )}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \left (\int \tan (c+d x)^{m+\frac {1}{2}} (A-C+B \tan (c+d x))dx+\frac {2 C \tan ^{m+\frac {3}{2}}(c+d x)}{d (2 m+3)}\right )}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 4021

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \left ((A-C) \int \tan ^{m+\frac {1}{2}}(c+d x)dx+B \int \tan ^{m+\frac {3}{2}}(c+d x)dx+\frac {2 C \tan ^{m+\frac {3}{2}}(c+d x)}{d (2 m+3)}\right )}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \left ((A-C) \int \tan (c+d x)^{m+\frac {1}{2}}dx+B \int \tan (c+d x)^{m+\frac {3}{2}}dx+\frac {2 C \tan ^{m+\frac {3}{2}}(c+d x)}{d (2 m+3)}\right )}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 3957

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \left (\frac {(A-C) \int \frac {\tan ^{m+\frac {1}{2}}(c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}+\frac {B \int \frac {\tan ^{m+\frac {3}{2}}(c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}+\frac {2 C \tan ^{m+\frac {3}{2}}(c+d x)}{d (2 m+3)}\right )}{\sqrt {\tan (c+d x)}}\)

\(\Big \downarrow \) 278

\(\displaystyle \frac {\sqrt {b \tan (c+d x)} \left (\frac {2 (A-C) \tan ^{m+\frac {3}{2}}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (2 m+3),\frac {1}{4} (2 m+7),-\tan ^2(c+d x)\right )}{d (2 m+3)}+\frac {2 B \tan ^{m+\frac {5}{2}}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{4} (2 m+5),\frac {1}{4} (2 m+9),-\tan ^2(c+d x)\right )}{d (2 m+5)}+\frac {2 C \tan ^{m+\frac {3}{2}}(c+d x)}{d (2 m+3)}\right )}{\sqrt {\tan (c+d x)}}\)

input
Int[Tan[c + d*x]^m*Sqrt[b*Tan[c + d*x]]*(A + B*Tan[c + d*x] + C*Tan[c + d* 
x]^2),x]
 
output
(Sqrt[b*Tan[c + d*x]]*((2*C*Tan[c + d*x]^(3/2 + m))/(d*(3 + 2*m)) + (2*(A 
- C)*Hypergeometric2F1[1, (3 + 2*m)/4, (7 + 2*m)/4, -Tan[c + d*x]^2]*Tan[c 
 + d*x]^(3/2 + m))/(d*(3 + 2*m)) + (2*B*Hypergeometric2F1[1, (5 + 2*m)/4, 
(9 + 2*m)/4, -Tan[c + d*x]^2]*Tan[c + d*x]^(5/2 + m))/(d*(5 + 2*m))))/Sqrt 
[Tan[c + d*x]]
 

3.1.47.3.1 Defintions of rubi rules used

rule 278
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( 
c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( 
-b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IGtQ[p, 0] && (ILtQ[p, 0 
] || GtQ[a, 0])
 

rule 2034
Int[(Fx_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Simp[b^IntPart 
[n]*((b*v)^FracPart[n]/(a^IntPart[n]*(a*v)^FracPart[n]))   Int[(a*v)^(m + n 
)*Fx, x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && 
  !IntegerQ[m + n]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3957
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d   Subst[Int 
[x^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{b, c, d, n}, x] && 
!IntegerQ[n]
 

rule 4021
Int[((b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[c   Int[(b*Tan[e + f*x])^m, x], x] + Simp[d/b   Int 
[(b*Tan[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x] && NeQ[c^ 
2 + d^2, 0] &&  !IntegerQ[2*m]
 

rule 4113
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) 
+ (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + 
 b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Si 
mp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && 
NeQ[A*b^2 - a*b*B + a^2*C, 0] &&  !LeQ[m, -1]
 
3.1.47.4 Maple [F]

\[\int \tan \left (d x +c \right )^{m} \sqrt {b \tan \left (d x +c \right )}\, \left (A +B \tan \left (d x +c \right )+C \tan \left (d x +c \right )^{2}\right )d x\]

input
int(tan(d*x+c)^m*(b*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)+C*tan(d*x+c)^2),x)
 
output
int(tan(d*x+c)^m*(b*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)+C*tan(d*x+c)^2),x)
 
3.1.47.5 Fricas [F]

\[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\int { {\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \sqrt {b \tan \left (d x + c\right )} \tan \left (d x + c\right )^{m} \,d x } \]

input
integrate(tan(d*x+c)^m*(b*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)+C*tan(d*x+c)^2 
),x, algorithm="fricas")
 
output
integral((C*tan(d*x + c)^2 + B*tan(d*x + c) + A)*sqrt(b*tan(d*x + c))*tan( 
d*x + c)^m, x)
 
3.1.47.6 Sympy [F]

\[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\int \sqrt {b \tan {\left (c + d x \right )}} \left (A + B \tan {\left (c + d x \right )} + C \tan ^{2}{\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \]

input
integrate(tan(d*x+c)**m*(b*tan(d*x+c))**(1/2)*(A+B*tan(d*x+c)+C*tan(d*x+c) 
**2),x)
 
output
Integral(sqrt(b*tan(c + d*x))*(A + B*tan(c + d*x) + C*tan(c + d*x)**2)*tan 
(c + d*x)**m, x)
 
3.1.47.7 Maxima [F(-1)]

Timed out. \[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\text {Timed out} \]

input
integrate(tan(d*x+c)^m*(b*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)+C*tan(d*x+c)^2 
),x, algorithm="maxima")
 
output
Timed out
 
3.1.47.8 Giac [F]

\[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\int { {\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \sqrt {b \tan \left (d x + c\right )} \tan \left (d x + c\right )^{m} \,d x } \]

input
integrate(tan(d*x+c)^m*(b*tan(d*x+c))^(1/2)*(A+B*tan(d*x+c)+C*tan(d*x+c)^2 
),x, algorithm="giac")
 
output
integrate((C*tan(d*x + c)^2 + B*tan(d*x + c) + A)*sqrt(b*tan(d*x + c))*tan 
(d*x + c)^m, x)
 
3.1.47.9 Mupad [F(-1)]

Timed out. \[ \int \tan ^m(c+d x) \sqrt {b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^m\,\sqrt {b\,\mathrm {tan}\left (c+d\,x\right )}\,\left (C\,{\mathrm {tan}\left (c+d\,x\right )}^2+B\,\mathrm {tan}\left (c+d\,x\right )+A\right ) \,d x \]

input
int(tan(c + d*x)^m*(b*tan(c + d*x))^(1/2)*(A + B*tan(c + d*x) + C*tan(c + 
d*x)^2),x)
 
output
int(tan(c + d*x)^m*(b*tan(c + d*x))^(1/2)*(A + B*tan(c + d*x) + C*tan(c + 
d*x)^2), x)